package com.weimob.mcloud.wechatwork.customer.service.user.enums;

/**
 * <P>
 *     标签来源
 * </P>
 * @author junlong.lv
 * @version 1.0
 * @date 2021/11/2 7:36 下午
 */
public enum TagSourceEnum {

    /**
     * 企业微信标签
     */
    WECHAT(1, "企微官方标签"),

    /**
     * 微盟标签
     *
     * 何为微盟标签：在微盟的业务里创建的标签，比如：企微助手、商城等
     */
    WEIMOB(2, "微盟标签");

    /**
     * 标签来源
     */
    private Integer source;

    /**
     *
     */
    private String msg;

    public static TagSourceEnum getEnumBySource(Integer type){
        if (type == null){
            return null;
        }
        for (TagSourceEnum tagTypeEnum : values()){
            if (tagTypeEnum.source.equals(type)){
                return tagTypeEnum;
            }
        }
        return null;
    }

    TagSourceEnum(Integer source, String msg) {
        this.source = source;
        this.msg = msg;
    }

    public Integer getSource() {
        return source;
    }

    public void setSource(Integer source) {
        this.source = source;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
